﻿@model EagleProject.LinQDataContext.CommonSubscriberReg

@{
    ViewBag.Title = "RegisterForm";
}
@using (Html.BeginForm("RegisterForm", "Subscriber", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <input type="hidden" value="@ViewBag.CardType" name="CardType"/>
        
    <fieldset>
        <legend>Register Subscriber Form</legend>
        <img src ="@Url.Content("~/img/" + ViewBag.CardImage)"/>
        <h3>Card Type: @ViewBag.CardName</h3>
        <h3>Register Fee: # @ViewBag.CardMoney</h3>
        <h3>Commencement Date: @ViewBag.CommencementDate</h3>
        <h3>Issue Date: @ViewBag.IssueDate</h3>
        <h3>Expired Date: @ViewBag.ExpiredDate</h3>

        <ol>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.FirstName)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.FirstName)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.FirstName)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.MiddleName)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.MiddleName)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.MiddleName)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Lastname)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Lastname)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Lastname)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Gender)</div>
                <div class="tbl-next" style="width: 18%;">@Html.Label("chkMale", "Male:") @Html.RadioButtonFor(m => m.Gender, true, htmlAttributes: new { @class = "radio" })</div>
                <div class="tbl-next" style="width: 18%;">@Html.Label("chkFemale", "Female:") @Html.RadioButtonFor(m => m.Gender, false, htmlAttributes: new { @class = "radio" })</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Gender)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Email)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Email)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Email)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.ContactAddress)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.ContactAddress)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.ContactAddress)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">
                    <label for="StateCurrentID">Current State</label>
                </div>
                <div class="tbl-next">@Html.DropDownList("StateCurrentID", ViewBag.ListState as SelectList, "Select State", new { id = "StateCurrentID" })</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">
                    <label for="LGACurrentID">Local Gov Area Current</label>
                </div>
                <div class="tbl-next">@Html.DropDownList("LGACurrentID", ViewBag.ListLGAs as SelectList, "Select Local Gov Area", new { id = "LGACurrentID" })</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.DOB)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.DOB)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.DOB)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">
                    <label for="StateOrginID">Orgin State</label>
                </div>
                <div class="tbl-next">@Html.DropDownList("StateOrginID", ViewBag.ListState as SelectList, "All", new { id = "StateOrginID" })</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">
                    <label for="LGAOrginID">Local Gov Area Orgin</label>
                </div>
                <div class="tbl-next">@Html.DropDownList("LGAOriginID", ViewBag.ListLGAs as SelectList, "Select Local Gov Area", new { id = "LGAOriginID" })</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.CountryResidentID)</div>
                <div class="tbl-next">@Html.DropDownListFor(m => m.CountryResidentID, (SelectList)ViewBag.ListCountry, "Select Country")</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.CountryResidentID)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.CountryCityzenID)</div>
                <div class="tbl-next">@Html.DropDownListFor(m => m.CountryCityzenID, (SelectList)ViewBag.ListCountry, "Select Country")</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.CountryCityzenID)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.MaritalStatus)</div>
                <div class="tbl-next">@Html.DropDownListFor(m => m.MaritalStatus, (SelectList)ViewBag.ListMarialStatus, "Select Marial Status")</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.MaritalStatus)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.Occupation)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.Occupation)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.Occupation)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.BloodGroup)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.BloodGroup)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.BloodGroup)</div>
                <div class="clear"></div>
            </li>
        </ol>
    </fieldset>
    <br />
    <fieldset>
        <legend>Personal Doctor Information</legend>
        <ol>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.PD_Name)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.PD_Name)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.PD_Name)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.PD_ContactNumber)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.PD_ContactNumber)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.PD_ContactNumber)</div>
                <div class="clear"></div>
            </li>
        </ol>
    </fieldset>    
    <fieldset>
        <legend>Next Kin Information</legend>
        <ol>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.NK_Name)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.NK_Name)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.NK_Name)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.NK_ContactNumber)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.NK_ContactNumber)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.NK_ContactNumber)</div>
                <div class="clear"></div>
            </li>
            <li>
                <div class="tbl-first">@Html.LabelFor(m => m.NK_Address)</div>
                <div class="tbl-next">@Html.TextBoxFor(m => m.NK_Address)</div>
                <div class="tbl-end">@Html.ValidationMessageFor(m => m.NK_Address)</div>
                <div class="clear"></div>
            </li>
        </ol>
    </fieldset>
    <input type="submit" class="btn" name="Submit" id="Submit" value="Register" />
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

<script src="@Url.Content("~/Scripts/jquery-1.7.1.js")"></script>
<script src="@Url.Content("~/DataScript/webApi.js")"></script>
<script>
    apiUrl = '@Url.Content("~/api/lga/")';
    registerUpdate('StateOrginID', 'LGAOrginID', 'Choose Local Gov Area', apiUrl);
    registerUpdate('StateCurrentID', 'LGACurrentID', 'Choose Local Gov Area', apiUrl);
</script>


